import 'dart:convert';

import 'package:safetymonitor/app/data/common/choice_bean.dart';
import 'package:safetymonitor/generated/json/base/json_field.dart';
import 'package:safetymonitor/generated/json/get_dict_all_entity.g.dart';
export 'package:safetymonitor/generated/json/get_dict_all_entity.g.dart';

@JsonSerializable()
class GetDictAllEntity implements ChoiceBean{
  GetDictAllEntity();

  factory GetDictAllEntity.fromJson(Map<String, dynamic> json) =>
      $GetDictAllEntityFromJson(json);

  ///	创建人
  String? createBy = '';

  ///	创建人Id
  String? createById = '';

  ///	创建时间
  String? createDate = '';

  ///	正常-0 已删除-1
  String? deleted = '';

  ///	子字典列表
  List<GetDictAllEntity>? dictionaryDetails = [];

  ///	字典表id
  String? dictionaryId = '';

  ///	字典键值
  String? dictionaryKeyValues = '';

  ///	字典标签
  String? dictionaryLabel = '';

  ///	字典表排序字段
  int? dictionarySort = 0;

  ///	字典类型
  String? dictionaryType = '';

  ///	主键id
  String? id = '';

  String? pid = '';

  ///	备注
  String? remark = '';

  ///	修改人
  String? updateBy = '';

  ///	修改人Id
  String? updateById = '';

  ///	修改时间
  String? updateDate = '';

  /// 是否选中
  bool isChecked = false;

  Map<String, dynamic> toJson() => $GetDictAllEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }

  @override
  String getId() {
    return id!;
  }

  @override
  bool getIsChecked() {
    return isChecked;
  }

  @override
  String getShowName() {
    return dictionaryLabel!;
  }

  @override
  setIsChecked(bool isChecked) {
    this.isChecked = isChecked;
  }
}
